#include "dialog.h"
#include <QPushButton>
#include <QVBoxLayout>
#include <QLabel>

dialog::dialog(QWidget* parent) : QDialog(parent)
{
    QVBoxLayout* box = new QVBoxLayout();
    this->setLayout(box);
    QLabel* label = new QLabel("这是一段文本", this);
    box->addWidget(label);
    QPushButton* button = new QPushButton("关闭", this);
    box->addWidget(button);
    connect(button, &QPushButton::clicked, this, [=](){
        this->close();
    });
}
